<?php
/*
php标准格式；
学习模板！
*/
header("content-type:text/html;charset=UTF-8");
$id = isset($_GET['id'])? $_GET['id'] : null;
$name = isset($_GET['name'])? $_GET['name'] : null;
if(!isset($id) && !isset($name))
{
	echo '非法的请求！';
	exit;
}
require "connect.php";
$sql = "delete from students where id={$id} and name='{$name}';";
$ret_que = mysql_query($sql);
if($ret_que)
{
	echo "<script type = 'text/javascript'>
	alert('删除成功！');
	location.href='admin.php';
	</script>";
	exit;
}else
{
	echo "<script type = 'text/javascript'>
	alert('删除失败！');
	location.href='admin.php';
	</script>";
	exit;
}
?>